const mongoose = require('../db/connection')

const userSchema = new mongoose.Schema({
    // _id: String,  //不能设置_id为string类型,它是默认生成的objectid类型
    title: String,
    img_big_logo: String,
    img_small_logo: String,
    price: String,
    current_price: String,
    stock: Number,
    is_sale: Boolean,
    is_hot: Boolean,
    goods_introduce: String
})

const goodsModel = mongoose.model('goods',userSchema,'goods')

//导出
module.exports = goodsModel